from tg import expose,redirect
from suportepaispython.lib.base import Controller
from suportepaispython.model import DBSession
from suportepaispython.model.Pais import Pais

class IncludePaisUC(Controller):

    @expose('suportepaispython.templates.includepais')
    def includepais(self,**kargs):
        return dict(page="")
    
    @expose()
    def do_includepais(self,codigoPais,codigoAuxiliar,descricao,valor,submit):
        DBSession.add(Pais(codigoPais,descricao,codigoAuxiliar,valor))
        redirect("/index")